package com.mldong.modules.sys.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 待执行任务队列
 * </p>
 *
 * @author mldong
 * @since 2025-10-12
 */
@Getter
@Setter
@TableName("sys_task_execution_queue")
@ApiModel(value = "TaskExecutionQueue对象", description = "待执行任务队列")
public class TaskExecutionQueue implements Serializable  {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("任务名称")
    private String taskName;

    @ApiModelProperty("springbean名称")
    private String springBeanName;

    @ApiModelProperty("业务ID")
    private Long bizId;

    @ApiModelProperty("任务状态(0:未开始；1：执行中；9：执行失败-待重试)")
    private Integer taskState;

    @ApiModelProperty("最新执行时间")
    private Date latestExecutionTime;

    @ApiModelProperty("允许最大失败次数")
    private Integer allowMaxErrorCount;

    @ApiModelProperty("运行失败次数")
    private Integer errorCount;

    @ApiModelProperty("最近运行错误原因")
    private String errorReason;

    @ApiModelProperty("扩展属性JSON")
    private String variable;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("创建用户")
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty("更新用户")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

}
